<?php session_start(); 
include 'connect.php';

if($_POST['name'] != $_SESSION['selectedProj'])
{
	$sql = mysql_query("UPDATE project SET ProjectName = '".$_POST['name']."' WHERE ProjectName = '".$_SESSION['selectedProj']."'");

echo"The Name has been changed. <br/>";
}
else
{
	echo"<strong>Name has not been changed.</strong> <br/>";
}



if($_POST['vers'] != $_SESSION['selectedVers'])
{
	$sql = mysql_query("UPDATE project SET Version = '".$_POST['vers']."' WHERE ProjectName = '".$_SESSION['selectedProj']."'");

echo"The version has been changed. <br/>";
}
else
{
	echo"<strong>Version has not been changed.</strong> <br/>";
}


if($_POST['status'] != $_SESSION['selectedStatus'])
{
	$sql = mysql_query("UPDATE project SET Status = '".$_POST['status']."' WHERE ProjectName = '".$_SESSION['selectedProj']."'");

echo"The Status has been changed. <br/>";
}
else
{
	echo"<strong>Status has not been changed.</strong> <br/>";
}


if($_POST['description'] != $_SESSION['selectedDesc'])
{
	$sql = mysql_query("UPDATE project SET Description = '".$_POST['description']."' WHERE ProjectName = '".$_SESSION['selectedProj']."'");

echo"The description has been changed. <br/>";
}
else
{
	echo"<strong>Description has not been changed.</strong> <br/>";
}

$sqlDate = mysql_query("UPDATE project SET LastAction = '".$_SESSION['today']."' WHERE ProjectName = '".$_SESSION['selectedProj']."'");
echo "The timestamp has been updated.<br/>";

 unset($_SESSION['selectedProj']);
?>

Go back to the <a href='projMan.php'>Project Manager</a>